/*
 * Copyright 2015-2019 Evun Technology. 
 * 
 * This software is the confidential and proprietary information of
 * Evun Technology. ("Confidential Information").  You shall not
 * disclose such Confidential Information and shall use it only in
 * accordance with the terms of the license agreement you entered into
 * with evun.cn.
 */
package cn.evun.sweet.demo.model;

import java.util.List;

import javax.persistence.Table;
import javax.persistence.Transient;

import org.apache.ibatis.type.Alias;

import cn.evun.sweet.base.model.OrgBase;
import cn.evun.sweet.core.mybatis.general.RelationTable;

/**
 * 组织部门信息表对应的实体
 *
 * @author yangw
 * @since 1.0.0
 */
@Alias("org")
@Table(schema="O", name="sweet_demo_org")
public class OrgDo extends OrgBase {

	/*静态字段自动排除，不予表字段映射*/
	private static final long serialVersionUID = 1L;
	
	/*实体对象会自动排除，不予映射。类似树结构的自关联由于别名冲突，无法使用关联查询功能*/
	public OrgDo parentOrg; 
	
	/*属性名必须和关联类对应的表名的驼峰形式一致，以保证级联查询有效。*/
	@RelationTable(fkCol="tenantId", col="orgTenantId")
	public TenantDo sweetDemoTenant;
	
	private Long orgResponsibleId;
	
	@Transient
	private List<UserDo> userList;

	public OrgDo getParentOrg() {
		return parentOrg;
	}

	public void setParentOrg(OrgDo parentOrg) {
		this.parentOrg = parentOrg;
	}

	public TenantDo getSweetDemoTenant() {
		return sweetDemoTenant;
	}

	public void setSweetDemoTenant(TenantDo sweetDemoTenant) {
		this.sweetDemoTenant = sweetDemoTenant;
	}

	public Long getOrgResponsibleId() {
		return orgResponsibleId;
	}

	public void setOrgResponsibleId(Long orgResponsibleId) {
		this.orgResponsibleId = orgResponsibleId;
	}

	public List<UserDo> getUserList() {
		return userList;
	}

	public void setUserList(List<UserDo> userList) {
		this.userList = userList;
	}
	
}
